package com.tmeone.erpone.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 采购表
 * @TableName t_review
 */
@TableName(value ="t_review")
@Data
public class TReview implements Serializable {
    /**
     * 审核说明表id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 订单编号
     */
    private String orderNumber;

    /**
     * 需求部门
     */
    private Integer departmentId;

    /**
     * 审核人
     */
    private String review;

    /**
     * 用户表（审核人）
     */
    @TableField(exist = false)
    private SUser user;

    /**
     * 申请说明
     */
    private String applyDescription;

    /**
     * 审核说明
     */
    private String reviewDescription;

    /**
     * 审核状态
     */
    private String reviewStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TReview other = (TReview) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderNumber() == null ? other.getOrderNumber() == null : this.getOrderNumber().equals(other.getOrderNumber()))
            && (this.getDepartmentId() == null ? other.getDepartmentId() == null : this.getDepartmentId().equals(other.getDepartmentId()))
            && (this.getReview() == null ? other.getReview() == null : this.getReview().equals(other.getReview()))
            && (this.getApplyDescription() == null ? other.getApplyDescription() == null : this.getApplyDescription().equals(other.getApplyDescription()))
            && (this.getReviewDescription() == null ? other.getReviewDescription() == null : this.getReviewDescription().equals(other.getReviewDescription()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderNumber() == null) ? 0 : getOrderNumber().hashCode());
        result = prime * result + ((getDepartmentId() == null) ? 0 : getDepartmentId().hashCode());
        result = prime * result + ((getReview() == null) ? 0 : getReview().hashCode());
        result = prime * result + ((getApplyDescription() == null) ? 0 : getApplyDescription().hashCode());
        result = prime * result + ((getReviewDescription() == null) ? 0 : getReviewDescription().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderNumber=").append(orderNumber);
        sb.append(", departmentId=").append(departmentId);
        sb.append(", review=").append(review);
        sb.append(", applyDescription=").append(applyDescription);
        sb.append(", reviewDescription=").append(reviewDescription);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}